#include <jni.h>
#include <string>

extern "C" JNIEXPORT jstring JNICALL
Java_com_yln_ffmpeg_JniActivity_stringFromJNI(
        JNIEnv *env,
        jobject /* this */) {
    std::string hello = "Hello from C++!JNI";
    return env->NewStringUTF(hello.c_str());
}
extern "C" JNIEXPORT jint JNICALL
Java_com_yln_ffmpeg_JniActivity_sum(
        JNIEnv *env,
        jobject,jint a,jint b) {
    jint result=a+b;
    return result;
}